package com.swfee.qinben.dto.rsp;

import android.os.Parcel;
import android.os.Parcelable;

import com.swfee.qinben.dto.base.BaseRspDto;

/**
 * 
 {"familyName":"张东","measureData":"dbp: 60\r\nsbp: 80\r\nmbp: 70\r\npulse: 51\r\n","receiveTime":"2013年4月15日","fileUrl":"","healthResult":0,"solution":"需要减少肉类食品的摄入和做半个小时的按摩。"}
 * 
 * @author ddr
 * 
 */
public class HealthMeasureRspDto extends BaseRspDto /*implements Parcelable*/ {

	private String familyName;
	private String measureData;
	private String  receiveTime;
	private String fileUrl;
	private Integer healthResult;
	private String solution;
	public String getFamilyName() {
		return familyName;
	}
	public void setFamilyName(String familyName) {
		this.familyName = familyName;
	}
	public String getMeasureData() {
		return measureData;
	}
	public void setMeasureData(String measureData) {
		this.measureData = measureData;
	}
	public String getReceiveTime() {
		return receiveTime;
	}
	public void setReceiveTime(String receiveTime) {
		this.receiveTime = receiveTime;
	}
	public String getFileUrl() {
		return fileUrl;
	}
	public void setFileUrl(String fileUrl) {
		this.fileUrl = fileUrl;
	}
	public Integer getHealthResult() {
		return healthResult;
	}
	public void setHealthResult(Integer healthResult) {
		this.healthResult = healthResult;
	}
	public String getSolution() {
		return solution;
	}
	public void setSolution(String solution) {
		this.solution = solution;
	}
	
	
	public String getMeasureDataHTML(){
		String html = measureData.replace("\r", "").replace("\n", "<br />");
		html = html.replaceAll("(\\w{1,})\\:", "<font color='#1e9ec3'>$1:</font>");
		if(healthResult == 0){
			html+="<font color='#1e9ec3'>处理建议：</font>"+solution;
		}
		return html;
	}
	
//	@Override
//	public int describeContents() {
//		return 0;
//	}
//	@Override
//	public void writeToParcel(Parcel dest, int flags) {
//		
//		dest.writeString(familyName);
//		dest.writeString(measureData);
//		dest.writeString(receiveTime);
//		dest.writeString(fileUrl);
//		dest.writeInt(healthResult);
//		dest.writeString(solution);
//	}
//	
//	public  static final  Parcelable.Creator<HealthMeasureRspDto> CREATOR = new Parcelable.Creator<HealthMeasureRspDto>() {   
//			//重写Creator
//			  
//			        @Override  
//			        public HealthMeasureRspDto createFromParcel(Parcel source) {   
//			        	HealthMeasureRspDto m = new HealthMeasureRspDto();   
//			             
//						m.familyName = source.readString();
//						m.measureData = source.readString();
//						m.receiveTime = source.readString();
//						m.fileUrl = source.readString();
//						m.healthResult = source.readInt();
//						m.solution = source.readString();
//			            
//			            return m;   
//			        }   
//
//			        public HealthMeasureRspDto[] newArray(int size) {   
//			        	return new HealthMeasureRspDto[size];      
//			        } 
//		  };
//	
	
}
